import { request } from './config.js';

// 获取常用观众列表
export const getVisitorList = (userId) => {
    return request({
        url: '/visitor/list',
        method: 'GET',
        data: { userId }
    });
};

// 获取观众详情
export const getVisitorDetail = (id) => {
    return request({
        url: `/visitor/detail/${id}`,
        method: 'GET'
    });
};

// 添加常用观众
export const addVisitor = (data) => {
    return request({
        url: '/visitor/add',
        method: 'POST',
        data
    });
};

// 更新常用观众
export const updateVisitor = (data) => {
    return request({
        url: '/visitor/update',
        method: 'PUT',
        data
    });
};

// 删除常用观众
export const deleteVisitor = (id) => {
    return request({
        url: `/visitor/delete/${id}`,
        method: 'DELETE'
    });
}; 